﻿using System.Windows;

namespace DependencyPropertySample
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            // 给依赖属性设置值
            CustomTextbox customTextbox = new CustomTextbox();
            customTextbox.IsHighlighted = true;

            // 也可以这样设置
            customTextbox.SetValue(CustomTextbox.IsHighlightedProperty, true);
        }
    }
}
